#include("LayuiHead.html")
<div class="layui-fluid layui-card">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">输入示例</li>
            <li>查看原码</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form action="" class="layui-form  margin-10" lay-filter="form">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">图标选择</label>

                                <div class="layui-input-inline" style="width:200px">
                                    <input type="text" lay-skin="myicon" name="test_icon" value="layui-icon-rate" class="layui-hide">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">图标选择</label>

                                <div class="layui-input-inline" style="width:200px">
                                    <input type="text" lay-skin="myicon" name="test_icon2" value="layui-icon-rate" class="layui-hide">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">备注</label>

                                <div class="layui-input-block">
                                    <textarea name="test_desc" placeholder="请输入备注" class="layui-textarea" style="height:60px"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="layui-tab-item">
                 <pre class="layui-code" lay-lang="HTML" lay-title="对应的HTML结构" encode="true">
                 &lt;input type="text" lay-skin="myicon" name="test_icon2" value="layui-icon-rate" class="layui-hide"&gt;
                </pre>
                <pre class="layui-code" lay-lang="JS" lay-title="对应的JS代码">
 layui.use(['myIcon'], function () {
        layui.myIcon.render({});
    });
                </pre>
            </div>
        </div>
    </div>
</div>
<script>
    var TreeInit = 'Icon';
    layui.use(['myIcon'], function () {
        layui.myIcon.render({});
    });

    layui.use(['form', 'myTool'], function () {
        layui.form.on('submit(Submit1)', function (data) {
            top.layer.alert('1:' + data.field.test_icon + '<br/>2:' + data.field.test_icon2, {offset: "100px"});
            return false;
        });
    });

</script>
#include("LayuiBottom.html")